package com.lhy.framework.beans.factory.factory;

import com.lhy.framework.beans.BeansException;

/**
 * @ClassName BeanPostProcessor
 * @Description
 * @Author lihaiyang
 * @Date 2022/9/12 09:50
 * @Version 1.0
 */
public interface BeanPostProcessor {

    /**
     * 在Bean对象执行初始化方法前，执行方法
     * @param beanName
     * @param bean
     * @return
     * @throws BeansException
     */
    Object postProcessBeforeInitialization(String beanName, Object bean) throws BeansException;

    /**
     * 在Bean对象执行初始化之后，执行方法
     * @param beanName
     * @param bean
     * @return
     * @throws BeansException
     */
    Object postProcessAfterInitialization(String beanName, Object bean) throws BeansException;

}
